 <form id="frm" action="/views/system/post/save" method="post"  onsubmit="return false">
  <table class="gritter-with-table"  cellspacing="1">
  		<tr>
  			<th><font color="red">*</font>宀椾綅鍚嶇О锛�/th>
  			<td>
  				<input name="name"  type="text" datatype="s1-255" nullmsg="姝ら」涓嶈兘涓虹┖" >
             	<div class="Validform_checktip"></div>
             	<input  name="code"   type="hidden" >
             	<input  name="status" type="hidden" value="1">
            </td>
  			<th><font color="red">*</font>鐖剁骇宀椾綅锛�/th>
        	<td>
        		<div class="input-group">
        			<input type="hidden"  name="parent_code" id="tree_post_code">
					<input id="tree_post_name" class="form-control"  name="parent_name" type="text"  readonly>
					<span class="input-group-addon" style="cursor: pointer;" onclick="openParent()">
						<i class="icon-folder-open-alt"></i>
					</span>
				</div>
			</td>
<!-- 			<th>鍒涘缓鏃堕棿锛�/th>
			<td>
				<div class="input-group">
					<input id="id-date-picker-1" name="create_time" class="form-control date-picker" type="text" 
					data-date-format="yyyy-mm-dd"> <span class="input-group-addon"> 
					<i class="icon-calendar bigger-110"></i>
					</span>
				</div>
			</td> -->
		</tr>
		<tr>
		  	<th>浠庡睘鏈烘瀯锛�/th>
        	<td>
        		<div class="input-group">
        			<input type="hidden"  name="org_code" id="tree_organ_code" value="${org_code!}">
					<input id="tree_organ_name" class="form-control"  name="org_name" type="text" value="${org_name!}" readonly>
					<span class="input-group-addon" style="cursor: pointer;" onclick="openOrgan()">
						<i class="icon-folder-open-alt"></i>
					</span>
				</div>
			</td>
			<th>浠庡睘鍖哄垝锛�/th>
        	<td>
        		<div class="input-group">
        			<input type="hidden"  name="region_code" id="regionCode" value="${region_code!}">
					<input id="regionName" class="form-control"  name="region_name" type="text" value="${region_name!}" readonly>
					<span class="input-group-addon" style="cursor: pointer;" onclick="openRegion()">
						<i class="icon-folder-open-alt"></i>
					</span>
				</div>
			</td>
		</tr>
		<tr>
			<th>澶囨敞淇℃伅锛�/th>
			<td colspan="3"><textarea id="post_add_remark" name="remark" type="text"></textarea>
		</tr>
		<tr>
			<th>鎺掑簭锛�/th>
			<td colspan="3">
				<div class="ace-spinner">
					<div class="input-group">
						<input id="spinner-sort" name="sort_order" class="input-mini spinner-input" type="text" value="00001" maxlength="3">
					</div>
				</div>
			</td>
		</tr>
  </table>
</form>
<script type="text/javascript">
$('#spinner-sort').ace_spinner({value:1,min:0,max:200,step:1, btn_up_class:'btn-info' , btn_down_class:'btn-info'});
var vl_frm = Power.form.validate("frm","pub-post-add");
function submit(){
	if(vl_frm.check()){
			//鎻愪氦琛ㄥ崟
		 	var cmd = new Power.submit("frm","mng/system/post");
		 	//璺緞浼犲弬
		 	cmd.setParameter("james","feng");
		 	cmd.setParameter("ok","feng");
		 	//璋冪敤method=save鏂规硶
	    	var ret = cmd.execute("save");
	    	if(!ret.error&&ret.state==1){
	    		Power.dialog.alertSuccess("娣诲姞鎴愬姛!");
	    		return true;
	    	}else{
	    		Power.dialog.alertError("娣诲姞澶辫触!");
	    		return false;
	    	}
		}
}
function openParent(){
	var addButtons = [{
		id:'choose-post-tree',
		name: '纭畾',
		callback: function () {
			return choosepost();
		},
		focus: true
		}, {
			name: '鍙栨秷'
		}];
	Power.dialog({width:300,height:250,title:"閫夋嫨鐖剁骇宀椾綅",url : "mng/system/tree/postTree",button:addButtons,init:function(){initTree();}});
}
function openOrgan(){
	var addButtons = [{
		id:'choose-organ-tree',
		name: '纭畾',
		callback: function () {
			return chooseOrgan();
		},
		focus: true
		}, {
			name: '鍙栨秷'
		}];
	Power.dialog({width:300,height:250,title:"閫夋嫨鎵�睘鏈烘瀯",url : "mng/system/tree/organTree",button:addButtons,init:function(){initTree();}});
}
function openRegion(){
	var addButtons = [{
		id:'choose-region-tree',
		name: '纭畾',
		callback: function () {
			return chooseRegion();
		},
		focus: true
		}, {
			name: '鍙栨秷'
		}];
	Power.dialog({width:300,height:250,title:"閫夋嫨鎵�睘鍖哄垝",url : "mng/system/tree/regionTree",button:addButtons,init:function(){initTree();}});
}
</script>